<?php
class HomeForm extends Form
{
    function HomeForm()
    {
        Form::Form('HomeForm');
        $this->link_js('javascript/common.js');

        $this->link_js('javascript/home.js');


    }

    function on_submit()
    {

    }
    function draw()
    {
        global $display;
        $booth = Db_Booth::getBooths('','(`status`=1) ORDER BY id ASC');
        $display->add('booth',$booth);
        $display->add('booth2',$booth);
        // get about
        $about = Db_About::getAboutById(1);
        $display->add('about',$about);
        // get image slide
        $slide = Db_Banner::getBanners('','(`status`=1) AND (`type`=2) ORDER BY pos ASC');
        $display->add('slide',$slide);
        $display->add('slide2',$slide);
        $display->add('slide3',$slide);
        // get chef all
        $chef = Db_Chief::getChiefs('','(`status`=1)  ORDER BY id ASC');
        //echo "<pre style='font-size: 13px'>";var_dump($chef);echo "</pre>";exit;
        $display->add('chef',$chef);
        $display->add('chef2',$chef);
        // get promotion all
        $promotion = Db_Promotion::getPromotions('','(`status`=1)  ORDER BY pos ASC');
        $display->add('promotion',$promotion);
       // get menus for js
        $menus = Db_Menu::getMenus('','(`status`=1)  ORDER BY pos ASC');
        $display->add('menu_layout',$menus);
        $display->output('Home');

    }
}

?>